package com.yuque.util;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.io.Serializable;

@Configuration
public class Fengye implements Serializable {
    @Bean
    public MybatisPlusInterceptor xx(){
        MybatisPlusInterceptor mpi = new MybatisPlusInterceptor();
        // 我们把分页拦截器加到mybatisplus的拦截器栈中
        mpi.addInnerInterceptor(new PaginationInnerInterceptor());

        return mpi;
    }
}
